//<!-- src/utils/loadAlgorithms.js -->
// 导入静态数据文件
import algorithmsData from '@/algorithms/tools.json';

export function loadAlgorithms() {
  const categories = [];

  // 遍历静态数据文件中的类别
  for (const category in algorithmsData) {
    const tools = algorithmsData[category].map(tool => ({
      name: tool.name,
      category: category,
      logo: 'default-logo.png',
      description: tool.description,
    }));

    categories.push({
      name: category,
      tools: tools,
    });
  }

  return categories;
}
